import { applyMiddleware, createStore } from 'redux'
import reducer from './reducers/index.js'
import thunk from 'redux-thunk'
import { composeWithDevTools } from 'redux-devtools-extension'
import { getTokenInfo } from '@/utils/storage.js'

// const store = createStore(reducer, composeWithDevTools(applyMiddleware(thunk)))
const store = createStore(
  reducer,
  {
    login: getTokenInfo(),
  },
  composeWithDevTools(applyMiddleware(thunk))
)

export default store
